Electronic compass

ABSTRACT

This electronic compass has a magnetic sensor for detecting two predetermined axis components out of the three geomagnetic axis components in a location and generating biaxial magnetic detection data corresponding to the magnitudes of the components, an acceleration sensor for detecting three axis components of the acceleration thereof and generating triaxial acceleration detection data corresponding to the three axis components, and an azimuth angle detection unit for calculating assumed magnetic detection data corresponding to the one remaining undetected axis component of the three geomagnetic axis components from the biaxial magnetic detection data, the triaxial acceleration detection data, and the magnitude and the magnetic dip of the geomagnetic field and detecting an azimuth angle by determining the component of the geomagnetic field parallel to the surface of the earth using the assumed magnetic detection data.

TECHNICAL FIELD

The present invention relates to an electronic compass.

BACKGROUND ART

Many modern handset devices such as mobile phones and smartphones areprovided with an electronic compass (azimuth angle sensor) for sensingthe orientation in which they find themselves.

LIST OF CITATIONS

Patent Literature

Patent Document 1: Japanese Patent No. 4552658

Non-Patent Literature

SUMMARY OF THE INVENTION Problem to be Solved by the Invention

Generally, in order to sense the orientation correctly, an accelerationsensor and a triaxial magnetic sensor are needed to take intoconsideration the inclination angle relative to the earth's surface.However, triaxial magnetic sensors often require a complicatedmanufacturing technology and thus they tend to be accordingly costly.

Proposed in the Patent Document 1 is a technology that enables asaccurate sensing of orientation or position using a biaxial magneticsensor, which is less expensive than a triaxial magnetic sensor, asusing a triaxial magnetic sensor. This conventional technology uses amethod involving sensing two axis components of geomagnetism and thenestimating, using the sensed values, the third axis component ofgeomagnetism.

However, the magnitude of geomagnetism is known to be different betweenindoors and outdoors even at the same site. Thus, for example, in asituation where the magnitude of geomagnetism can change as one movesbetween indoors and outdoors (for example, as one enters or exits from abuilding), it is not always easy to estimate the third axis component ofgeomagnetism based only on two axis components of geomagnetism, possiblyleading to insufficient azimuth angle sensing accuracy.

In light of the above-mentioned problem found by the present inventors,it is an object of the invention disclosed herein to provide aninexpensive electronic compass which can accurately sense orientationusing a biaxial magnetic sensor.

Means for Solving the Problem

According to one aspect of what is disclosed herein, an electroniccompass includes: a magnetic sensor which senses predetermined two axiscomponents out of three axis components of geomagnetism at a given siteto generate two-axis magnetic sensing data corresponding to themagnitudes of the respective components; an acceleration sensor whichsenses three axis components of acceleration applied to the sensoritself to generate three-axis acceleration sensing data corresponding tothe magnitudes of the respective components; an azimuth angle detectorwhich is configured to calculate virtual magnetic sensing datacorresponding to, out of the three axis components of the geomagnetism,a remaining unsensed one axis component based on the two-axis magneticsensing data, the three-axis acceleration sensing data, and themagnitude and the magnetic dip of the geomagnetism thereby to determinethe ground-horizontal components of the geomagnetism to sense an azimuthangle (a first configuration).

In the electronic compass of the first configuration described above,preferably, the azimuth angle detector is configured to calculate, asone processing step, a ground-vertical component of the geomagnetismbased on the magnitude and the magnetic dip of the geomagnetism (asecond configuration).

In the electronic compass of the second configuration, the azimuth angledetector can be configured to calculate, as one processing step, aninclination angle relative to the ground surface based on the three-axisacceleration sensing data to derive a rotation matrix (a thirdconfiguration).

In the electronic compass of the third configuration, the azimuth angledetector can be configured to multiply, as one processing step,three-axis magnetic sensing data resulting from combining together thetwo-axis magnetic sensing data and the virtual magnetic sensing data bythe rotation matrix to derive the ground-horizontal components and theground-vertical component of the geomagnetism as a function of thevirtual magnetic sensing data (a fourth configuration).

In the electronic compass of the fourth configuration, the azimuth angledetector can be configured to calculate, as one processing step, thevirtual magnetic sensing data based on the known ground-verticalcomponent of the geomagnetism to determine the ground-horizontalcomponents of the geomagnetism (a fifth configuration).

In the electronic compass of the fifth configuration, the azimuth angledetector can be configured to sense, as one processing step, the azimuthangle based on the ground-horizontal components of the geomagnetism (asixth configuration).

In the electronic compass of any one of the first to sixthconfiguration, the azimuth angle detector can be configured todetermine, as one processing step, based on the two-axis magneticsensing data that changes with time, either the maximum value of aresultant vector of the two axis components or one-half of the larger ofthe differences between the maximum and minimum values of the two axiscomponents, to take the determined value as the magnitude of thegeomagnetism (a seventh configuration).

In the electronic compass of any one of the first to seventhconfiguration, the magnetic sensor can be configured to include a hallelement, a magnetoresistance (MR) element, or a magnetic impedance (MI)element (an eighth configuration).

According to another aspect of what is disclosed herein, an electronicappliance disclosed in the present description includes an electroniccompass in any one of the first to eighth configuration (a ninthconfiguration).

According to another aspect of what is disclosed herein, an azimuthangle sensing method disclosed in the present description is a methodfor sensing an azimuth angle using a magnetic sensor for sensingpredetermined two axis components out of three axis components ofgeomagnetism at a given site to generate two-axis magnetic sensing datacorresponding to magnitudes of the respective two axis components, andan acceleration sensor for sensing three axis components of accelerationapplied to the sensor itself to generate three-axis acceleration sensingdata corresponding to the magnitudes of the respective three axiscomponents. The method includes: alculating a ground-vertical componentof the geomagnetism based on a magnitude and a magnetic dip of thegeomagnetism; calculating an inclination angle relative to a groundsurface based on the three-axis acceleration sensing data to derive arotation matrix; multiplying three-axis magnetic sensing data includingthe two-axis magnetic sensing data and one-axis virtual magnetic sensingdata by the rotation matrix to derive ground-horizontal components andthe ground-vertical component of the geomagnetism as a function of thevirtual magnetic sensing data; calculating the virtual magnetic sensingdata based on a known ground-vertical component of the geomagnetism todetermine the ground-horizontal components of the geomagnetism; sensingthe azimuth angle based on the ground-horizontal components of thegeomagnetism (a tenth configuration).

Advantageous Effects of the Invention

With the invention disclosed herein, it is possible to provide aninexpensive electronic compass which can accurately sense theorientation using a biaxial magnetic sensor.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 A block diagram showing one configuration example of anelectronic compass.

FIG. 2 A schematic diagram showing a state where a magnetic sensor iskept horizontal relative to the ground surface.

FIG. 3 A schematic diagram showing a state where the magnetic sensor isinclined relative to the ground surface.

FIG. 4 A schematic diagram showing the magnitude and the magnetic dip ofgeomagnetism.

FIG. 5 A schematic diagram showing a rotation angle p around the X-axisand a rotation angle r around the Y-axis.

FIG. 6 A schematic diagram showing a state where azimuth angle sensingis performed based on the ground-horizontal component of geomagnetism.

FIG. 7 A flowchart showing one example of a procedure for the azimuthangle sensing.

FIG. 8 An exterior view of a smartphone.

FIG. 9 An exterior view of a tablet computer.

FIG. 10 An exterior view of a smartwatch.

DESCRIPTION OF EMBODIMENTS

<Electronic Compass>

FIG. 1 is a block diagram showing one configuration example of anelectronic compass. The electronic compass 1 of this configurationexample has a magnetic sensor 10, an acceleration sensor 20, and anazimuth angle detector 30.

The magnetic sensor 10 is a biaxial magnetic sensor for sensingpredetermined two axis components (X-axis and Y-axis components) out ofthree axis components (X-axis, Y-axis, and Z-axis components) ofgeomagnetism at a given site (the place where the electronic compass 1is located) to generate two-axis magnetic sensing data (hx′, hy′)corresponding to the magnitudes of the respective components. That is,in the magnetic sensor 10, the Z-axis component of geomagnetism is not asensing target, and thus no Z-axis magnetic sensing data hz′ (see abroken line in the diagram) is generated. The axes (X-axis, Y-axis, andZ-axis) mentioned above can be designed so as to be orthogonal to eachother. As the magnetic sensor 10, for example, a hall element, amagnetoresistance (MR) element, or a magnetic impedance (MI) element canbe used.

The acceleration sensor 20 is a triaxial acceleration sensor for sensingthree axis components (X-axis, Y-axis, and Z-axis components) of theacceleration applied to the sensor itself (and hence to the electroniccompass 1) to generate three-axis acceleration sensing data (ax, ay, az)corresponding to the magnitudes of the respective components.

The azimuth angle detector 30 senses the azimuth angle θ (the directionin which the electronic compass points) based on the two-axis magneticsensing data (hx′, hy′), the three-axis acceleration sensing data (ax,ay, az), and the magnitude |M| and the magnetic dip α of geomagnetism atthe site. Internal processing in the azimuth angle detector 30 will bedescribed in detail later.

Although, in the diagram, data related to the magnetic dip α and themagnitude |M| of geomagnetism is shown to be fed from outside theazimuth angle detector 30, such data may be generated inside the azimuthangle detector 30. This will also be described later.

<Inclination Relative to the Ground Surface>

As mentioned above, the magnetic sensor 10 incorporated in theelectronic compass 1 is a biaxial magnetic sensor, which is lessexpensive than a triaxial magnetic sensor. When sensing the azimuthangle θ using a biaxial magnetic sensor, in general, it is necessary toperform azimuth angle sensing while keeping the magnetic sensor 10horizontal to the ground surface (FIG. 2) so that no consideration needsto be given to the inclination angle of the magnetic sensor 10 relativeto the ground surface.

However, many electronic appliances equipped with the electronic compass1 are handset devices (such as mobile phones and smartphones) that areoften operated while being held in a user's hand, and the magneticsensor 10 can be inclined at varying angles to the ground surface (FIG.3). Thus, while the azimuth angle θ is sensed, the user needs to berequested to keep the magnetic sensor 10 in a horizontal state as shownin FIG. 2, and this is hardly a practical mode of use.

As a solution, the azimuth angle detector 30 is configured to calculatevirtual magnetic sensing data hz′ corresponding to the Z-axis componentof geomagnetism based on two-axis magnetic sensing data (hx′, hy′),three-axis acceleration sensing data (ax, ay, az), and the magnitude Mand the magnetic dip α of geomagnetism at a given site, thereby todetermine a ground-horizontal component (which will be described indetail later) of geomagnetism, so as to be capable of sensing theazimuth angle θ correctly even if the magnetic sensor 10 is inclinedrelative to the ground surface.

Of particular note is that, in the azimuth angle detector 30, not onlythe magnitude |M| of geomagnetism but also the magnetic dip α ofgeomagnetism is meaningfully used in performing azimuth angle sensing.Its technical significance will be described in detail below.

<The Magnitude and the Magnetic Dip of Geomagnetism>

FIG. 4 is a schematic diagram showing the magnitude |M| and the magneticdip α of geomagnetism. Geomagnetism (see a thick arrow in the diagram)acts from around the south pole to around the north pole, and itsmagnitude |M| and magnetic dip α (the angle at which geomagnetism entersthe earth's surface, or the angle at which geomagnetism exits theearth's surface) are known to vary according to the latitude and thelongitude of the observation site.

The magnitude |M| of geomagnetism can have different values, forexample, between indoors and outdoors even at the same site. On theother hand, the magnetic dip α of geomagnetism can safely be consideredto have a generally constant value regardless of whether indoors oroutdoors within the range of ordinary activity of average users (withinthe range of local activity involving no long-distance movement byairplane or the like).

Based on the above findings, an azimuth angle sensing method proposed inthe present description involves meaningfully using not only themagnitude |M| of geomagnetism but also the magnetic dip α ofgeomagnetism, thereby to accurately calculate virtual magnetic sensingdata of the Z-axis, which is not sensed by the magnetic sensor 10, so asto achieve more accurate sensing of the azimuth angle θ.

<Azimuth Angle Sensing>

Azimuth angle sensing by the azimuth angle detector 30 will be describedspecifically below. First, the relationship between three-axis magneticsensing data (hx′, hy′, hz′) (where hz′ is virtual magnetic sensingdata) and three-axis projected magnetic sensing data (hx, hy, hz)obtained by projecting the three-axis magnetic sensing data to theground-horizontal plane can be expressed by formula (1) below. Out ofthe three-axis projected magnetic sensing data (hx, hy, hz), hx and hycorrespond to ground-horizontal components of geomagnetism respectively,and hz corresponds to a ground-vertical component of geomagnetism.

$\begin{matrix}{\mspace{79mu}\left\lbrack {{Formula}\mspace{20mu} 1} \right\rbrack} & \; \\{\begin{pmatrix}{hx} \\{hy} \\{hz}\end{pmatrix} = {{R^{T}\begin{pmatrix}{hx}^{\prime} \\{hy}^{\prime} \\{hz}^{\prime}\end{pmatrix}} = {\begin{pmatrix}{\cos(r)} & 0 & {- {\sin(r)}} \\{{\sin(p)}{\sin(r)}} & {\cos(p)} & {{\sin(p)}{\cos(r)}} \\{{\cos(p)}{\sin(r)}} & {- {\sin(p)}} & {{\cos(p)}{\cos(r)}}\end{pmatrix}\begin{pmatrix}{hx}^{\prime} \\{hy}^{\prime} \\{hz}^{\prime}\end{pmatrix}}}} & (1)\end{matrix}$

In formula (1) above, the rotation matrix R is, as shown in FIG. 5, arotation matrix for rotating the three-axis magnetic sensing data (hx′,hy′, hz′) by a rotation angle (inclination angle) p around the X-axisand then further rotating it by a rotation angle (inclination angle) raround the Y-axis, and R^(T) its transposed matrix. The rotation matrixR is expressed by formula (2) below.

$\begin{matrix}\left\lbrack {{Formula}\mspace{20mu} 2} \right\rbrack & \; \\\begin{matrix}{R = {\begin{pmatrix}{\cos(r)} & 0 & {\sin(r)} \\0 & 1 & 0 \\{- {\sin(r)}} & 0 & {\cos(r)}\end{pmatrix}\begin{pmatrix}1 & 0 & 0 \\0 & {\cos(p)} & {- {\sin(p)}} \\0 & {\sin(p)} & {\cos(p)}\end{pmatrix}}} \\{= \begin{pmatrix}{\cos(r)} & {{\sin(p)}{\sin(r)}} & {{\cos(p)}{\sin(r)}} \\0 & {\cos(p)} & {- {\sin(p)}} \\{- {\sin(r)}} & {{\sin(p)}{\cos(r)}} & {{\cos(p)}{\cos(r)}}\end{pmatrix}}\end{matrix} & (2)\end{matrix}$

The relationship between the three-axis acceleration sensing data (ax,ay, az), which is detected in a state inclined by a rotation angle(inclination angle) p around the X-axis and by a rotation angle(inclination angle) r around the Y axis, and gravity acceleration (0,0, 1) can be expressed by formula (3) below.

$\begin{matrix}\left\lbrack {{Formula}\mspace{20mu} 3} \right\rbrack & \; \\{\begin{pmatrix}{ax} \\{ay} \\{az}\end{pmatrix} = {{R\begin{pmatrix}0 \\0 \\1\end{pmatrix}} = \begin{pmatrix}{{\cos(p)}{\sin(r)}} \\{- {\sin(p)}} \\{{\cos(p)}{\cos(r)}}\end{pmatrix}}} & (3)\end{matrix}$

Here, the output values of acceleration sensing data (ax, ay, az) arenormalized respectively using formula (4) below.

$\begin{matrix}{\mspace{79mu}\left\lbrack {{Formula}\mspace{20mu} 4} \right\rbrack} & \; \\{\left. {ax}\leftarrow\frac{ax}{\sqrt{{ax}^{2} + {ay}^{2} + {az}^{2}}} \right.,\left. {ay}\leftarrow\frac{ay}{\sqrt{{ax}^{2} + {ay}^{2} + {az}^{2}}} \right.,\left. {az}\leftarrow\frac{az}{\sqrt{{ax}^{2} + {ay}^{2} + {az}^{2}}} \right.} & (4)\end{matrix}$

Thus, the inclination angles p and r can be determined by formulae (5a)and (5b) below respectively.

$\begin{matrix}\left\lbrack {{Formula}\mspace{20mu} 5} \right\rbrack & \; \\\begin{matrix}{{p = {- {\sin^{- 1}({ay})}}},} & \left( {{- \frac{\pi}{2}} \leq p \leq \frac{\pi}{2}} \right)\end{matrix} & \left( {5a} \right) \\\begin{matrix}{{r = {\tan^{- 1}\left( \frac{ax}{az} \right)}},} & \left( {{- \frac{\pi}{2}} \leq r \leq \frac{\pi}{2}} \right)\end{matrix} & \left( {5b} \right)\end{matrix}$

In the above example, rotation is performed “first around the X-axis andthen around the Y-axis”, but if the order is changed to “first aroundthe Y-axis and then around the X-axis”, it should be noted that therotation matrix R and the inclination angles p and r are expresseddifferently than above. Specifically, in formula (2) above, themultiplication by the rotation matrix around the X-axis and by therotation matrix around the Y-axis proceeds in the reversed order, andthus the rotation matrix R is then expressed differently, and thus theinclination angles p and r are also expressed differently. Even then,the way of thinking is quite the same as with the above example. Thefollowing continuation of detailed description assumes the use of therotation matrix R that rotates “first around the X-axis and then aroundthe Y-axis” (formula (2) above).

Sensing the azimuth angle θ, as shown in FIG. 6, simply requires the useof the ground-horizontal components of geomagnetism, that is, out ofthree-axis projected magnetic sensing data (hx, hy, hz) in formula (1),only hx and hy. However, in order to calculate the ground-horizontalcomponents hx and hy of geomagnetism, it is necessary to know theunsensed virtual magnetic sensing data hz′ of the Z-axis, and thus,practically, three-axis magnetic sensing data (hx′, hy′, hz′) is allrequired.

Thus, a method for calculating virtual magnetic sensing data hz′ usingthe ground-vertical component hz of geomagnetism, which is not directlyrelated to the sensing of the azimuth angle θ, will now be described.

Based on formula (1) above, the ground-vertical component hz ofgeomagnetism is expressed by formula (6) below.[Formula 6]hz=hx′ cos p sin r−hy′ sin p+hz′ cos p cos r  (6)

As is understood from FIG. 4 referred to previously, the ground-verticalcomponent hz of geomagnetism can be expressed also by formula (7) belowusing the magnitude |M| and the magnetic dip α of geomagnetism.[Formula 7]hz=|M| sin α  (7)

Thus, based on formulae (6) and (7), virtual magnetic sensing data hz′of the Z-axis can be calculated using formula (8) below.

$\begin{matrix}{\;\left\lbrack {{Formula}\mspace{20mu} 8} \right\rbrack} & \; \\{{hz}^{\prime} = \frac{{{M}\sin\mspace{11mu}\alpha} - \left( {{{hx}^{\prime}\cos\mspace{11mu} p\mspace{11mu}\sin\mspace{11mu} r} - {{hy}^{\prime}\sin\mspace{11mu} p}} \right)}{\cos\; p\mspace{11mu}\cos\mspace{11mu} r}} & (8)\end{matrix}$

By substituting the virtual magnetic sensing data hz′ in formula (1),the ground-horizontal components hx and hy of geomagnetism can bedetermined by formulae (9a) and (9b) below respectively.

$\begin{matrix}\left\lbrack {{Formula}\mspace{20mu} 9} \right\rbrack & \; \\{{hx} = {{{hx}^{\prime}\left( {{\cos\mspace{11mu} r} + {\sin\mspace{11mu} r\mspace{11mu}\tan\mspace{11mu} r}} \right)} - {{hy}^{\prime}\tan\mspace{11mu} p\mspace{11mu}\tan\mspace{11mu} r} - {{M}\sin\mspace{11mu}\alpha\frac{\tan\mspace{11mu} r}{\cos\mspace{11mu} p}}}} & \left( {9a} \right) \\{{hy} = {{{hy}^{\prime}\left( {{\cos\mspace{11mu} p} + {\sin\mspace{11mu} p\mspace{11mu}\tan\mspace{11mu} p}} \right)} + {{M}\sin\mspace{11mu}\alpha\mspace{11mu}\tan\mspace{11mu} p}}} & \left( {9b} \right)\end{matrix}$

Finally, the azimuth angle θ can be calculated by formula (10) belowusing the ground-horizontal components hx and hy of geomagnetism.

$\begin{matrix}\left\lbrack {{Formula}\mspace{20mu} 10} \right\rbrack & \; \\{\theta = {\tan^{- 1}\left( \frac{hy}{hx} \right)}} & (10)\end{matrix}$

In the sequence of azimuth angle sensing described above, the magneticsensor 10 may require offset correction. In that case, any offsetcorrection algorithm can be applied using two-axis magnetic sensing data(hx′, hy′) and one-axis virtual magnetic sensing data hz′. Theinclination angles p and r used to calculate virtual magnetic sensingdata hz′ are determined based on acceleration sensing data (ax, ay, az),and thus it should be noted that calibration for a big action may notwork well.

<Flowchart>

FIG. 7 is a flowchart showing one example of a procedure for the azimuthangle sensing explained so far. Unless specifically mentioned, theprincipal agent of each processing step is the azimuth angle detector30.

First, in step S1, the magnetic dip α of geomagnetism at the site isdetermined. The magnetic dip α can be calculated by a predeterminedapproximation formula based on location information (latitude andlongitude) obtained from a global positioning system (GPS), or can bederived from a magnetic dip map information library such as the oneprovided by Geospatial Information Authority of Japan. Another optionis, instead of using a GPS, previously preparing region-specific (suchas state-specific) data of the magnetic dip α. If the magnetic dip α ofgeomagnetism at the site is known, the value can be set automatically orby manual input. For example, the magnetic dip α is about 49 degrees inTokyo (latitude 35 degrees north, longitude 139 degrees east), and isabout 68 degrees in Berlin (latitude 52 degrees north, longitude 13degrees east).

Next, in step S2, the magnitude |M| of geomagnetism at the site ispreliminarily determined. If a triaxial magnetic sensor is used as themagnetic sensor 10, the magnitude of the resultant vector of three-axismagnetic sensing data can be regarded as the magnitude |M| ofgeomagnetism. However, the electronic compass 1 of this configurationexample uses a biaxial magnetic sensor as the magnetic sensor 10, andthus a method other than the one just mentioned needs to be adopted.

One possible method for determining the magnitude |M| of geomagnetism isas follows. While the electronic compass 1 is moved so that the X- andthe Y-axes of the magnetic sensor 10 each pass near the Z-axis, forexample, as if to describe the figure of “8”, two-axis magnetic sensingdata (hx′, hy′) that changes with time is sensed successively todetermine either the maximum value of the resultant vector of the twoaxis components or one-half of the larger of the differences between themaximum and minimum values of the two axis components. The so determinedvalue is taken as the magnitude of geomagnetism |M|.

As the magnetic dip α is determined by one of the methods describedpreviously, likewise the magnitude |M| of geomagnetism can be calculatedby a predetermined approximation formula based on location informationobtained from a GPS, or can be derived from a magnetic dip mapinformation library such as the one provided by Geospatial InformationAuthority of Japan. Another option is, instead of using a GPS,previously preparing region-specific (such as state-specific) data ofthe magnitude |M| of geomagnetism. If the magnitude |M| of geomagnetismat the site is known, the value can be set automatically or by manualinput.

Next, in step S3, it is checked whether the preliminarily determinedmagnitude |H| of geomagnetism is within a proper range. Here, if thecheck yields Yes, the procedure proceeds to Step 4, and if the checkyields No, the procedure returns to step S2. The proper range justmentioned can be set with consideration given to the magnitude ofgeomagnetism (for example, 10 μT to 70 μT) generally observed on theearth.

If the check yields Yes in step S3, then in step S4, the ground-verticalcomponent hz of geomagnetism is calculated based on the magnitude M andthe magnetic dip α of geomagnetism using formula (7) noted previously.

Next, in step S5, based on three-axis acceleration sensing data (ax, ay,az), the inclination angles p and r of the magnetic sensor 10 relativeto the ground surface (see formulae (5a) and (5b) noted previously) iscalculated to derive the rotation matrix R (see formula (2) notedpreviously).

Next, in step S6, by multiplying three-axis magnetic sensing data (hx′,hy′, hz′) resulting from combining together two-axis magnetic sensingdata (hx′, hy′) and one-axis virtual magnetic sensing data hz′ by therotation matrix R (or more accurately, by its transposed matrix R^(T)),the three-axis magnetic sensing data (hx′, hy′, hz′) is projected to theground-horizontal plane, and thereby three-axis projected magneticsensing data (hx, hy, hz) is determined (see formula (1) notedpreviously). That is, in step S6, the ground-horizontal components hxand hy and the ground-vertical component hz of geomagnetism are derivedas a function of the virtual magnetic sensing data hz′.

Next, in step S7, with focus on the ground-vertical component hz ofgeomagnetism (formulae (6) and (7) noted previously), virtual magneticsensing data hz′ (formula (8) noted previously) is calculated, andfurthermore, based on formulae (9a) and (9b) noted previously, theground-horizontal components hx and hy of geomagnetism are determined.

Finally, in step S8, the azimuth angle θ is calculated based on theground-horizontal components hx and hy of geomagnetism using formula(10) noted previously. Then, the procedure returns to step S5, andthereafter step S5 through S8 is repeated so that the azimuth angle θsensing is continued.

Effects of the Invention

As explained above, with the electronic compass 1 of this configurationexample, it is possible to perform as accurate orientation sensing usinga biaxial magnetic sensor, which is less expensive than a triaxialmagnetic sensor, as using a triaxial magnetic sensor.

The electronic compass 1 of this configuration example meaningfullyuses, in azimuth angle sensing, not only the magnitude |M| ofgeomagnetism but also the magnetic dip α of geomagnetism, which isconsidered constant in local terms. Thus, even in a situation where themagnitude |M| of geomagnetism can change as one moves between indoorsand outdoors (for example, as one enters or exits from a building), itis possible to correctly estimate the geomagnetism component for theunsensed axis, allowing accurate sensing of azimuth angle θ at anyinclination angles.

Examples of Application of the Electronic Compass

FIGS. 8 to 10 are exterior views showing examples of electronicappliances (a smartphone 100, a tablet computer 200, and a smartwatch300) provided with an electronic compass. Incorporating theabove-mentioned electronic compass 1 in those appliances enablesaccurate orientation sensing. Combining a global positioning system(GPS) with the electronic compass 1, in particular, allows higherlocation sensing accuracy in map applications and navigationapplications.

Other Modified Examples

The various technical features disclosed herein can be implemented inany other manner than in the embodiments described above and allow formany modifications and variations within the spirit of their technicalingenuity. The above embodiments should be understood to be in everyaspect illustrative and not restrictive. The scope of the presentdisclosure is defined not by the description of the embodiments givenabove but by the appended claims, and should be understood to encompassany modifications made in the sense and scope equivalent to those of theclaims.

INDUSTRIAL APPLICABILITY

The invention disclosed in the present description finds application inelectronic compasses incorporated in handset devices such as mobilephones, smartphones, tablet computers, or smartwatches.

LIST OF REFERENCE SIGNS

-   -   1 electronic compass (azimuth angle sensor)    -   10 magnetic sensor    -   20 acceleration sensor    -   30 azimuth angle detector    -   100 smartphone    -   200 tablet computer    -   300 smartwatch

The invention claimed is:
 1. An electronic compass comprising: amagnetic sensor configured to sense predetermined two axis componentsout of three axis components of geomagnetism at a site to generatetwo-axis magnetic sensing data corresponding to magnitudes of therespective two axis components; an acceleration sensor configured tosense three axis components of acceleration applied to the accelerationsensor to generate three-axis acceleration sensing data corresponding tomagnitudes of the respective three-axis components; and an azimuth angledetector configured to calculate virtual magnetic sensing datacorresponding to, out of the three axis components of the geomagnetism,a remaining unsensed one axis component based on the two-axis magneticsensing data, the three-axis acceleration sensing data, and a magnitudeand a magnetic dip of the geomagnetism, and to determine, using thevirtual magnetic sensing data, ground-horizontal components of thegeomagnetism, thereby to sense an azimuth angle, wherein the azimuthangle detector is configured to calculate, as one processing step, aground-vertical component of the geomagnetism based on the magnitude andthe magnetic dip of the geomagnetism, wherein the azimuth angle detectoris configured to calculate, as one processing step, an inclination anglerelative to a ground surface based on the three-axis accelerationsensing data to derive a rotation matrix, and wherein the azimuth angledetector is configured to calculate the virtual magnetic sensing data(hz′), based on the two-axis magnetic sensing data (hx′ and hy′), theinclination angle (p and r), and the magnitude (|M|) and the magneticdip (α) of the geomagnetism, by using formula (X) below: $\begin{matrix}{{hz}^{\prime} = {\frac{{{M}\sin\;\alpha} = \left( {{{hx}^{\prime}\cos\; p\;\sin\; r} - {{hy}^{\prime}\sin\; p}} \right.}{\cos\; p\;\cos\; r}.}} & (X)\end{matrix}$
 2. The electronic compass according to claim 1, whereinthe azimuth angle detector is configured to multiply, as one processingstep, three-axis magnetic sensing data resulting from combining togetherthe two-axis magnetic sensing data and the virtual magnetic sensing databy the rotation matrix to derive the ground-horizontal components andthe ground-vertical component of the geomagnetism as a function of thevirtual magnetic sensing data.
 3. The electronic compass according toclaim 2, wherein the azimuth angle detector is configured to calculate,as one processing step, the virtual magnetic sensing data based on aknown ground-vertical component of the geomagnetism to determine theground-horizontal components of the geomagnetism.
 4. The electroniccompass according to claim 3, wherein the azimuth angle detector isconfigured to sense, as one processing step, the azimuth angle based onthe ground-horizontal components of the geomagnetism.
 5. The electroniccompass according to claim 1, wherein the azimuth angle detector isconfigured to determine, as one processing step, based on the two-axismagnetic sensing data that changes with time, either a maximum value ofa resultant vector of the two axis components or one-half of a larger ofdifferences between maximum and minimum values of the two axiscomponents, to take the determined value as the magnitude of thegeomagnetism.
 6. The electronic compass according to claim 1, whereinthe magnetic sensor includes a hall element, a magnetoresistance (MR)element, or a magnetic impedance (MI) element.
 7. An electronicappliance comprising the electronic compass according to claim
 1. 8. Anazimuth angle sensing method for sensing an azimuth angle using amagnetic sensor for sensing predetermined two axis components out ofthree axis components of geomagnetism at a site to generate two-axismagnetic sensing data corresponding to magnitudes of the respective twoaxis components, and an acceleration sensor for sensing three axiscomponents of acceleration applied to the acceleration sensor togenerate three-axis acceleration sensing data corresponding to themagnitudes of the respective three axis components, the methodcomprising: calculating a ground-vertical component of the geomagnetismbased on a magnitude and a magnetic dip of the geomagnetism; calculatingan inclination angle relative to a ground surface based on thethree-axis acceleration sensing data to derive a rotation matrix;calculating one-axis virtual magnetic sensing data (hz′), based on thetwo-axis magnetic sensing data (hx′ and hy′), the inclination angle (pand r), and the magnitude (|M|) and the magnetic dip (α) of thegeomagnetism, by using formula (X) below: $\begin{matrix}{{hz}^{\prime} = {\frac{{{M}\sin\;\alpha} = \left( {{{hx}^{\prime}\cos\; p\;\sin\; r} - {{hy}^{\prime}\sin\; p}} \right.}{\cos\; p\;\cos\; r}.}} & (X)\end{matrix}$ multiplying three-axis magnetic sensing data including thetwo-axis magnetic sensing data and the one-axis virtual magnetic sensingdata by the rotation matrix to derive ground-horizontal components andthe ground-vertical component of the geomagnetism as a function of thevirtual magnetic sensing data; calculating the virtual magnetic sensingdata based on a known ground-vertical component of the geomagnetism todetermine the ground-horizontal components of the geomagnetism; andsensing the azimuth angle based on the ground-horizontal components ofgeomagnetism.